<?php
namespace TwinPeaks\Core;

trait TAppInjector
{
	/**
	 * @return CWebApplication
	 */
	static function getApplication()
	{
		static $appInstance = null;
		
		if ($appInstance === null)
			$appInstance = CWebApplication::getMyChild()[0];

		return $appInstance;	
	}
}
